package xyz.chaobei.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.lang.Integer;
import java.util.List;

/**
 * 权限表实体类
 * @author mrc
 * @Date ${Date}
 */
@Data
@TableName("org_permission")
public class OrgPermissionEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 权限表
     */
    @TableId(value = "id_",type = IdType.AUTO)
    private Integer id;

    /**
     * 权限名称
     */
    @TableField("name_")
    private String name;

    /**
     * 1 菜单 2页面 3按钮
     */
    @TableField("type_")
    private Integer type;

    /**
     * 权限路径
     */
    @TableField("url_")
    private String url;

    /**
     * 排序
     */
    @TableField("index_")
    private Integer index;

    /**
     * 权限字符
     */
    @TableField("permission_")
    private String permission;

    /**
     * 权限图标
     */
    @TableField("icon_")
    private String icon;

    /**
     * 父级
     */
    @TableField("parent_id_")
    private Integer parentId;

    @TableField(exist = false)
    private List<OrgPermissionEntity> children;
}
